//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
#include <cstdlib>

#include <iostream>
#include <fstream>

#include "PDBToFASTA.h"
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
using namespace std;
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
int main(int argc, char** argv) {

  String* folderInLigand;
  String* folderInDB;
  String* filenameOut;
  String* listFile;

  if (argc < 5) {
    cout << "Error in the input arguments. The execution must be: " << endl;
    cout << "./GetFastaFileFromPDB <folder with the pdb ligand files> <folder with pdb files> <file with list of files> <output file with names and PDBID for Ligands>" << endl;
    return 0;
  }
  else {
    cout << "---------------------------------------------------------------------------------" << endl;
    cout << "  Input  Folder Ligands: " << argv[1] << endl;
    cout << " Input  Folder Database: " << argv[2] << endl;
    cout << "          List File In : " << argv[3] << endl;
    cout << "     Output Fasta File : " << argv[4] << endl;
    cout << "---------------------------------------------------------------------------------" << endl;
    folderInLigand = new String(argv[1]);
    folderInDB     = new String(argv[2]);
    listFile       = new String(argv[3]);
    filenameOut    = new String(argv[4]);
  }

  PDBToFASTA* pdbToFASTA = new PDBToFASTA();

  pdbToFASTA->Location(folderInLigand);
  pdbToFASTA->FilenameOut(filenameOut);
  pdbToFASTA->ListInFilename(listFile);
  pdbToFASTA->GetNameLigandPDBUsingList(folderInDB);

  cout << "---------------------------------------------------------------------------------" << endl;

  if (pdbToFASTA) delete pdbToFASTA;

  return 1;

}
//---------------------------------------------------------------------------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------------------------------------------------------------------------//



